import { ColumnProps } from "/@/components/ProTable/interface";

// 配置项
const columns = (): Partial<ColumnProps>[] => {
    return [{
            type: "selection",
            width: 60,
            fixed: "left"
        },
        {
            type: "index",
            label: "#",
            width: 60
        },{
            prop: "dataSource",
            label: "数据来源",
            search: true,
        },
        {
            prop: "columnKey",
            label: "字段名",
            search: true,
        },
        {
            prop: "columnName",
            label: "字段说明",
            search: true,
        },
        {
            prop: "dictCode",
            label: "字典编码",
            search: true,
        },
        {
            prop: "dictSource",
            label: "字典来源",
            enum:[{'label': '其他字段取值', value: 0}, {'label': '直接取值', value: 1}],
            width: 240,
        },
        {
            prop: "dataStatus",
            label: "状态",
            search: true,
            enum:[{'label': '停用', value: 0}, {'label': '启用', value: 1}],
            searchType: "select",
            width: 240,
        },
        {
            prop: "operation",
            label: "操作",
            width: 260,
            fixed: "right"
        }
    ]
}

export default columns;